package com.llkj.qingnianguoxue.home;

import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.llkj.qingnianguoxue.R;
import com.llkj.qingnianguoxue.adapter.SignRuleAdapter;
import com.llkj.qingnianguoxue.base.BaseActivity;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

public class SignRuleActivity extends BaseActivity {

    @BindView(R.id.rvSignRule)
    RecyclerView rvSignRule;
    private SignRuleAdapter mRuleAdapter;
    private List<String> mRuleData;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_sign_rule);
        setTitle("签到规则", true, TITLE_TYPE_IMG, R.drawable.icon_back, false,-1,-1);
        ButterKnife.bind(this);

        initView();
    }

    private void initView(){
        initStatusbar(TSATUSBAR_TYPE_BLACK_TEXT,rlTitle,R.color.gray_bar);
        rvSignRule.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL,false));
        mRuleData = new ArrayList<>();
        initRuleData();
        mRuleAdapter = new SignRuleAdapter(R.layout.item_sign_rule,mRuleData);
        rvSignRule.setAdapter(mRuleAdapter);
    }

    private void initRuleData(){
        mRuleData.add("1.第一天签到得1范儿币；第二天得3范儿币；第3天得6范儿币...第7天107范儿币");
        mRuleData.add("2.连续签到7天奖励：第一个七天+100、第二个七天+200、第三个七天+300、第四个七天+400");
        mRuleData.add("3.连续签到30天奖励：+500范儿币");
        mRuleData.add("4.中断签到从首次签到计算");
        mRuleData.add("5.连续签到30天，回归首次签到状态");
    }
}
